package blackitheima1.FactorialTest;
//递归阶乘
public class FactorialTest1 {
    public static void main(String[] args) {
        int sum= getSum(10);
        System.out.println(sum);
    }

    private static int getSum(int i) {
        if(i==1){
            return 1;
        }else{
            return i*getSum(i-1);
        }
    }
}
